#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%

langId:=unset
F1::
    If (IsChineseLanguage())
        MsgBox The keyboard is set to Chinese.
    else
        MsgBox The keyboard is set to English.
    return

IsChineseLanguage()
{
    hkl := DllCall("GetKeyboardLayout", "UInt", 0)
    langId := DllCall("LANGIDFROMLCID", "UInt", hkl)
    MsgBox, %hkl%
    MsgBox, %langId%
    ; 0x0804 represents Simplified Chinese (PRC)
    return langId = 0x0804
}
